public class Test {
    public static void main(String[] args) {
        TestBinaryTree testBinaryTree = new TestBinaryTree();
        TestBinaryTree.TreeNode root = testBinaryTree.createTree();
        System.out.println(testBinaryTree.isCompleteTree(root));
        testBinaryTree.preOrderNor(root);
        System.out.println();
        testBinaryTree.inOrderNor(root);
        System.out.println();
        testBinaryTree.postOrderNor(root);
    }
    public static void main2(String[] args) {
        TestBinaryTree testBinaryTree = new TestBinaryTree();
        TestBinaryTree.TreeNode root = testBinaryTree.createTree("abc##de#g##f###");
        System.out.println("======");
        System.out.println("层序遍历：");
        testBinaryTree.levelOrder(root);
        System.out.println();

    }

    public static void main1(String[] args) {
        TestBinaryTree testBinaryTree = new TestBinaryTree();
        TestBinaryTree.TreeNode root = testBinaryTree.createTree();
        System.out.println("======");
        testBinaryTree.preOrder(root);
        System.out.println();
        testBinaryTree.inOrder(root);
        System.out.println();
        testBinaryTree.postOrder(root);
        System.out.println();
        System.out.println("======");

        System.out.println("节点的个数: "+testBinaryTree.size(root));
        testBinaryTree.size2(root);
        //System.out.println("节点的个数2: "+ TestBinaryTree.nodeSize);
        System.out.println("节点的个数2: "+ testBinaryTree.nodeSize);
        System.out.println("叶子节点的个数：" + testBinaryTree.getLeafNodeCount(root));
        testBinaryTree.getLeafNodeCount2(root);
        System.out.println("叶子节点的个数2：" + testBinaryTree.leafSize);

        System.out.println("第K层的节点个数："+testBinaryTree.getKLevelNodeCount(root,3));

        System.out.println("二叉树的高度："+testBinaryTree.getHeight(root));

        TestBinaryTree.TreeNode ret = testBinaryTree.find(root,'G');
        System.out.println("查找："+ret.val);

    }
}

